package com.rtx.model.po.service.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rtx.api.annotation.DataSourceAnnotation;
import com.rtx.model.po.entity.system.UserPermission;
import com.rtx.model.po.mapper.UserPermissionMapper;
import com.rtx.model.po.service.UserPermissionDAO;

@Component
public class UserPermissionDAOImpl extends ServiceImpl<UserPermissionMapper, UserPermission> implements UserPermissionDAO{

	@DataSourceAnnotation
	@Override
	public List<UserPermission> selectUserPermissionByQueryCondition(String datasourcekey, LambdaQueryWrapper<UserPermission> qw) {
		return baseMapper.selectList(qw);
	}

	@DataSourceAnnotation
	@Override
	public int deleteByCondition(String datasourcekey, LambdaQueryWrapper<UserPermission> qw) {
		return baseMapper.delete(qw);
	}

	@DataSourceAnnotation
	@Override
	public int insert(String datasourcekey, UserPermission up) {
		return baseMapper.insert(up);
	}
}
